package com.lujianfei.android_1_glide;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
import com.bumptech.glide.request.RequestOptions;

public class CircleActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_circle);
        ImageView iv_icon = findViewById(R.id.iv_icon);
        Glide.with(this)
                .load("https://img.lovebuy99.com/uploads/allimg/190926/15-1Z926152Q5.jpg")
                .apply(RequestOptions.bitmapTransform(new CircleCrop()))
                .into(iv_icon);
    }
}
